<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>大类资产配置模型---产品资产配置</title>
  <link rel="stylesheet" href="../../assets/css/layui.css" />
  <link rel="stylesheet" href="../../assets/css/main.css" />
  <script src="../../assets/js/jquery-1.11.1.min.js"></script>
  <script src="../../assets/js/layui.js"></script>
  <script src="../../assets/js/vue.min.js"></script>
</head>

<body>
  <div id="app">
    <div class="layui-card tableCard">
      <div class="title-header">配置信息</div>
      <div class="layui-form form-box pt-20">
        <div class="layui-form-item">
          <label class="layui-form-label">理财产品：</label>
          <div class="layui-input-block">
            <input type="text" name="je" value="建行“乾元-众享”理财产品2018第3期" autocomplete="off" class="layui-input layui-input-md">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">配置方式：</label>
          <div class="layui-input-block select-md">
            <select id="u4754_input" lay-filter="pzfs" class="layui-input-md">
              <option value="请选择">请选择</option>
              <option selected="" value="自主投资">自主投资</option>
              <option value="委外投资">委外投资</option>
            </select>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label"><span class="span-t">产品募集金额</span><br>(待投总金额)：</label>
          <div class="layui-input-inline">
            <input type="text" name="je" value="1,000,000"  autocomplete="off" class="layui-input layui-input-md">
          </div>
          <div class="layui-form-mid layui-word-aux">万元</div>
        </div>
        <!-- <div class="layui-form-item" style="margin-top:-12px;">
          <label class="layui-form-label">理财产品总额：</label>
          <div class="layui-form-mid">2,200,000万元</div>
        </div> -->
        <!-- <div class="layui-form-item">
          <label class="layui-form-label"></label>
          <div class="layui-input-block input-tips">提示：根据您输入的待投总金额，全部理财产品还可投非标资产<b>420,000</b>万元。</div>
        </div> -->
        <div class="layui-form-item">
          <label class="layui-form-label">产品配置资产：</label>
          <div class="layui-input-block tableBox">
            <table cellspacing="0" cellpadding="0" border="0" class="layui-table editTable">
              <thead>
                <tr>
                  <th width="200">资产类型(大类)</th>
                  <th width="200">资产名称</th>
                  <th width="150">配置金额(万元)</th>
                  <th width="120">资产配置比例</th>
                  <th width="150">资产价格</th>
                  <th>企业名称</th>
                  <!-- <th>备注</th> -->
                  <th>操作</th>
                </tr>
              </thead>
              <tr v-for="(item,index) in ArrData" :key="index">
                <td>
                  <div class="layui-unselect layui-form-select">
                    <div class="layui-select-title"><input type="text" v-model="item.clasN" readonly="" class="layui-input layui-unselect"><i class="layui-edge"></i></div>
                    <dl class="layui-anim layui-anim-upbit">
                      <dd :class="[item.AssetClass==0 ? 'layui-this' : '']" @click="setData(index,'请选择')">请选择</dd>
                      <dd :class="[item.AssetClass==1 ? 'layui-this' : '']" @click="setData(index,'非标准化债权类资产')">非标准化债权类资产</dd>
                      <dd :class="[item.AssetClass==2 ? 'layui-this' : '']" @click="setData(index,'债券')">债券</dd>
                      <dd :class="[item.AssetClass==3 ? 'layui-this' : '']" @click="setData(index,'同业存款')">同业存款</dd>
                      <dd :class="[item.AssetClass==4 ? 'layui-this' : '']" @click="setData(index,'同业存单')">同业存单</dd>
                      <dd :class="[item.AssetClass==5 ? 'layui-this' : '']" @click="setData(index,'回购')">回购</dd>
                  </dl>
                  </div>
                </td>
                <td>
                  <div class="layui-unselect layui-form-select">
                    <div class="layui-select-title"><input type="text" placeholder="请选择" v-model="item.AssetN" readonly="" class="layui-input layui-unselect"><i class="layui-edge"></i></div>
                    <dl class="layui-anim layui-anim-upbit">
                      <dd lay-value="0" :class="[item.AssetName==0 ? 'layui-this' : '']" @click="setData(index,'请选择',2)">请选择</dd>
                      <dd lay-value="1" :class="[item.AssetName==1 ? 'layui-this' : '']" v-if="item.clasN=='非标准化债权类资产'"  @click="setData(index,'非标资产A2',2)">非标资产A2</dd>
                      <dd lay-value="2" :class="[item.AssetName==2 ? 'layui-this' : '']"  v-if="item.clasN=='债券'" @click="setData(index,'债券资产A2',2)">债券资产A2</dd>
                      <dd lay-value="3" :class="[item.AssetName==3 ? 'layui-this' : '']" v-if="item.clasN=='同业存款'" @click="setData(index,'同业存款资产C1',2)">同业存款资产C1</dd>
                      <dd lay-value="4" :class="[item.AssetName==4 ? 'layui-this' : '']" v-if="item.clasN=='同业存单'" @click="setData(index,'同业存单资产D1',2)">同业存单资产D1</dd>
                      <dd lay-value="5" :class="[item.AssetName==5 ? 'layui-this' : '']" v-if="item.clasN=='回购'" @click="setData(index,'回购资产D1',2)">回购资产D1</dd>
                    </dl>
                  </div>
                </td>
                <td>
                  <input type="text" name="'je_'+index" v-model="item.amount" autocomplete="off" class="layui-input layui-input-sm" @input="setPortion(index)">
                </td>
                <td>{{item.proportion}}</td>
                <td>
                  <input type="text" name="'jep_'+index" v-model="item.price" autocomplete="off" class="layui-input layui-input-sm" @input="setPrice">
                </td>
                <td>{{item.CompanyName}}</td>
                <!-- <td>
                  <div class="layui-table-cell">{{item.mark}}</div>
                </td> -->
                <td><button class="layui-btn layui-btn-normal layui-btn-xs" @click="del(index)">删除</button></td>
              </tr>
              <tr>
                <td><span class="add_span"  @click="addItem"><i class="layui-icon layui-icon-add-1"></i> 点击添加</span></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <!-- <td></td> -->
                <td></td>
              </tr>
              <tr>
                <td colspan="8">
                  <p class="text-left pt-10">{{syl_txt}}</p>
                  <p class="text-left">{{ypzje_txt}}</p>
                  <p class="text-left pb-10">{{spzje_txt}}</p>
                </td>
              </tr>
            </table>
            <div class="pt-20 pb-10"><button class="layui-btn layui-btn-normal  pr-40 pl-40" @click="submitForm">提交</button></div>
          </div>
        </div>
        <!-- <div class="tableBox pr-10 pl-10">
          <p class="table-title">产品配置资产：</p>
        </div> -->
      </div>
    </div>
  </div>
</body>

</html>
<script src="../../assets/js/modules/DLZCPZMX/CPZCPZ.js"></script>
<script>
$(".tableBox").on("click",".layui-unselect",function(){
  $(this).toggleClass("layui-form-selected")
})
$(".tableBox").on("click",".layui-anim dd",function(){
  $(this).parent().find("dd").removeClass('layui-this');
  $(this).addClass("layui-this");
})
</script>